<cfcomponent extends="assets.calgrants.com.Base">

	<cfscript>
        import assets.calgrants.com.service.CSACOrderWorkshopService;
		this.service = new CSACOrderWorkshopService();
	</cfscript>

	<cffunction name="get" output="false" access="remote" returntype="assets.calgrants.com.bo.CSACOrderWorkshop">
		<cfreturn this.service.get(argumentCollection = arguments) />
	</cffunction>
	
	<cffunction name="query" output="false" access="public" returntype="query">
		<cfreturn this.service.read(argumentCollection = arguments) />
	</cffunction>
	
	<cffunction name="save" output="false" access="public" returntype="any" hint="If a property is not present in the submission, will use saved value, or default for new">
        <cfscript>
			var csacOrderWorkshop = "";
			var csacOrderWorkshop_ = this.service.get(CSAC_Order_Workshop_ID = arguments.CSAC_Order_Workshop_ID);
			if (IsInstanceOf(arguments[1], "assets.csac.com.bo.CSACOrderWorkshop")) {
				csacOrderWorkshop_ = arguments[1];
			} else {
				var args = {};
				StructAppend(args, arguments);
				args.obj = Duplicate(csacOrderWorkshop_);
				csacOrderWorkshop = this.service.load(argumentCollection = args);
			}
			csacOrderWorkshop.setCSAC_Order_Workshop_ID(this.service.save(csacOrderWorkshop));
			return csacOrderWorkshop;
        </cfscript>
	</cffunction>
	
	<cffunction name="delete" output="false" access="public" returntype="boolean">
		<cfreturn this.service.destroy(argumentCollection = arguments) />
	</cffunction>

</cfcomponent>